﻿@model List<Wicresoft.UnifyShow.Business.SiteBranchAndWorkListModel>
@using Wicresoft.UnifyShow.Business;
@{
    List<Wicresoft.UnifyShow.Business.SiteBranchAndWorkListModel> meModel = Model.OrderBy(o => o.siteid).ToList();
    List<UserAndSiteModel> sitesMe = (List<UserAndSiteModel>)ViewData["SitesMe"];
    List<string> sitesAlias = sitesMe.Select(o => o.SiteAlias).ToList();
    Wicresoft.UnifyShow.Business.SiteBranchAndWorkListModel temp = null;

    Dictionary<decimal, string> SiteAndAlias = new Dictionary<decimal, string>();
    foreach (var item in sitesMe)
    {
        SiteAndAlias.Add(item.SiteID, item.SiteAlias);
    }
    
    
}
<table class="talbe_gray" width="100%" height="150" border="0" cellpadding="0" cellspacing="0">
    <tbody>
        <tr>
            <td colspan="3">
                事件信息
            </td>
        </tr>
        <tr>
            <td class="altrow">
                归属地
            </td>
            <td class="altrow">
                累计数量
            </td>
            <td class="altrow">
                未解决数量
            </td>
        </tr>
        @foreach (var item in sitesAlias)
        {
            temp = meModel.FirstOrDefault(o => o.alls == item);
            <tr>
                <td>
                    @item
                </td>
                <td>
                    @if (temp != null)
                    {
                        <text>@temp.sign</text>
                    }
                    else
                    {
                        <text>0</text>
                    }
                </td>
                <td>
                    @if (temp != null)
                    {
                        <text> @temp.sign2</text>
                    }
                    else
                    {
                        <text>0</text>
                    }
                </td>
            </tr>
        }
    </tbody>
</table>
